﻿/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
	config.language = 'zh-cn';
	config.undoStackSize = 20;
	config.disableObjectResizing = false;  //是否禁用图片和表 的改变大小
	//config.startupFocus = true;
	
	//编辑器相关设置：宽高 、背景颜色、样式（’kama’（默认）、’office2003′、’v2′ ）、主题
	config.width = 990; 
	config.height = 400; 
	config.uiColor = '#AADC6E';//#C2CEEA
	config.skin = 'kama';
	config.font_names = '宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体_GB2312;隶书/隶书;幼圆/幼圆;微软雅黑/微软雅黑'+config.font_names;
	config.editingBlock = true; 
	
	//编辑器中相关键配置：回车==>br、shift+Enter==> p、快捷键
	config.enterMode = CKEDITOR.ENTER_BR;
	config.shiftEnterMode = CKEDITOR.ENTER_P;
	config.tabSpaces = 8;
	config.keystrokes = [ [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ], //获取焦点
			[ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ], //元素焦点
			[ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ], //文本菜单
			[ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ], //撤销
			[ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ], //重做
			[ CKEDITOR.CTRL + 66 /*B*/, 'bold' ], //粗体
			[ CKEDITOR.CTRL + 73 /*I*/, 'italic' ], //斜体
			[ CKEDITOR.CTRL + 85 /*U*/, 'underline' ] //下划线
    ];
	
	//字体相关配置：默认大小、 文字方向(rtl从左到右、ltr从右到左)
	//config.fontSize_defaultLabel = '14px';
	//config.contentsLangDirection = 'rtl'; 
	
	
	//表情相关配置：地址、对应的表情图片
//	config.smiley_path = 'plugins/smiley/images/';
//	config.smiley_images = [
//		    'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif',
//		    'tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif',
//		    'angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif',
//		    'lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'
//	];

//	config.smiley_path = 'plugins/smiley/monkey/';
//	config.smiley_images = [
//		'01.gif','02.gif','03.gif','04.gif','05.gif',
//		'06.gif','07.gif','08.gif','09.gif','10.gif',
//		'11.gif','12.gif','13.gif','14.gif','15.gif',
//		'16.gif','17.gif'
//	];

	
	// 工具栏相关配置：（基础’Basic’、全能’Full’、自定义）、位置 （bottom、top）、是否展开 
	config.toolbarLocation = 'top'; 
	config.toolbarCanCollapse = true;
	config.toolbar = 'MyToolbar';
    config.toolbar_MyToolbar =
    [
		['Source','Preview','-','Templates'],
	    ['Cut','Copy','Paste','insertcode','PasteText'],
	    ['Undo','-','Find','Replace','-','SelectAll','RemoveFormat'],
	    ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
	    ['NumberedList','BulletedList','-','Outdent','Indent'],
	    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
	    ['Link','Unlink'],
	    ['Image','Table','HorizontalRule','Smiley','SpecialChar'],
	    ['Styles','Format','Font','FontSize'],
	    ['TextColor','BGColor'],
	    ['Maximize']	
    ];
    
//  config.toolbar = 'Full';
//	config.toolbar_Full =
//	[
//	    ['Source','-','Save','NewPage','Preview','-','Templates'],
//	    ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
//	    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
//	    ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
//	    '/',
//	    ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
//	    ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
//	    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
//	    ['BidiLtr', 'BidiRtl'],
//	    ['Link','Unlink','Anchor'],
//	    ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
//	    '/',
//	    ['Styles','Format','Font','FontSize'],
//	    ['TextColor','BGColor'],
//	    ['Maximize', 'ShowBlocks','-','About']
//	];
//        config.toolbar = 'Basic';
//	config.toolbar_Basic =
//	[
//	    ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
//	];


	// 文件上传配置
	//config.filebrowserUploadUrl = '../../WebEditorUpload.do?type=File';
   // config.filebrowserImageUploadUrl = cn.com.hoonsoft.filebrowserImageUploadUrl;
    //config.filebrowserUploadUrl=cn.com.hoonsoft.filebrowserImageUploadUrl;
    //config.filebrowserImageUploadUrl = '/systemapp/file/ProcessPageWebEditFileUploadFormFileUploadwebEditUpload.do?fileSource=webEdit';
	//config.filebrowserFlashUploadUrl = '../../WebEditorUpload.do?type=Flash';
	// 文件浏览配置(浏览服务器)
	//config.filebrowserImageBrowseUrl = 'scanServer.jsp?type=image';

	
	// 拖拽配置：是否取消 “拖拽以改变尺寸”、改变 范围
	//config.resize_enabled = false;
	//config.resize_maxWidth = 3000;
	//config.resize_minHeight = 250;
	//config.resize_minWidth = 750;

	// 当提交包含有此编辑器的表单时，是否自动更新元素内的数据 
	//config.autoUpdateElement = true;

	//设置是使用绝对目录还是相对目录，为空为相对目录 
	//config.baseHref = '';

	// 编辑器的z-index值 
	//config.baseFloatZIndex = 10000; 
	
	//所需要添加的CSS文件(编辑器样式) 在此添加 可使用相对路径和网站的绝对路径
	 config.contentsCss = './contents.css';

	//界面编辑框的背景色
	//config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
	//config.dialog_backgroundCoverColor = 'white'; //默认

	//背景的不透明度 数值应该在：0.0～1.0 之间 plugins/dialog/plugin.js
	//config.dialog_backgroundCoverOpacity = 0.5;

	//在 CKEditor中集成 CKFinder
	//CKFinder.SetupCKEditor(null, ‘/ckfinder/’);

};
